package by.plisitsa.railway.datamodel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

@Entity
public class Wagon extends AbstractEntity {
	@Column
	private String nameWgn;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = WagonType.class)
	private WagonType wagonType;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Seat.class)
	private Seat seat;

	public String getNameWgn() {
		return nameWgn;
	}

	public void setNameWgn(String nameWgn) {
		this.nameWgn = nameWgn;
	}

	public WagonType getWagonType() {
		return wagonType;
	}

	public void setWagonType(WagonType wagonType) {
		this.wagonType = wagonType;
	}

	public Seat getSeat() {
		return seat;
	}

	public void setSeat(Seat seat) {
		this.seat = seat;
	}

	

	
}